/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

import entidade.Aluno;
import java.io.Serializable;
import javax.enterprise.context.SessionScoped;
import javax.faces.bean.ManagedBean;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 *
 * @author Thais
 */
@ManagedBean(name = "treinoController")
@SessionScoped
public class TreinoController implements Serializable{
    private Aluno alunoSelecionado;

    public Aluno getAlunoSelecionado() {
        HttpServletRequest req = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
        HttpSession session = req.getSession();
        alunoSelecionado = (Aluno) session.getAttribute("alunoSelecionado");
        return alunoSelecionado;
    }
    
    
}
